
package com.ruoyi.info.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.info.mapper.AuditingMapper;
import com.ruoyi.info.domain.Auditing;
import com.ruoyi.info.service.IAuditingService;

/**
 * 审核信息Service业务层处理
 * 
 * @author wangshi
 * @date 2023-06-07
 */
@Service
public class AuditingServiceImpl implements IAuditingService 
{
    @Autowired
    private AuditingMapper auditingMapper;

    /**
     * 查询审核信息
     * 
     * @param id 审核信息主键
     * @return 审核信息
     */
    @Override
    public Auditing selectAuditingById(Long id)
    {
        return auditingMapper.selectAuditingById(id);
    }

    /**
     * 查询审核信息列表
     * 
     * @param auditing 审核信息
     * @return 审核信息
     */
    @Override
    public List<Auditing> selectAuditingList(Auditing auditing)
    {
        return auditingMapper.selectAuditingList(auditing);
    }

    /**
     * 新增审核信息
     * 
     * @param auditing 审核信息
     * @return 结果
     */
    @Override
    public int insertAuditing(Auditing auditing)
    {
        auditing.setCreateTime(DateUtils.getNowDate());
        return auditingMapper.insertAuditing(auditing);
    }

    /**
     * 修改审核信息
     * 
     * @param auditing 审核信息
     * @return 结果
     */
    @Override
    public int updateAuditing(Auditing auditing)
    {
        auditing.setUpdateTime(DateUtils.getNowDate());
        return auditingMapper.updateAuditing(auditing);
    }

    /**
     * 批量删除审核信息
     * 
     * @param ids 需要删除的审核信息主键
     * @return 结果
     */
    @Override
    public int deleteAuditingByIds(Long[] ids)
    {
        return auditingMapper.deleteAuditingByIds(ids);
    }

    /**
     * 删除审核信息信息
     * 
     * @param id 审核信息主键
     * @return 结果
     */
    @Override
    public int deleteAuditingById(Long id)
    {
        return auditingMapper.deleteAuditingById(id);
    }
}
